<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
      <title>Step Present Preference Page | HiAPI-C# 2025 </title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="title" content="Step Present Preference Page | HiAPI-C# 2025 ">
      
      
      <link rel="icon" href="../../../../img/HiAPI.favicon.ico">
      <link rel="stylesheet" href="../../../../public/docfx.min.css">
      <link rel="stylesheet" href="../../../../public/main.css">
      <meta name="docfx:navrel" content="../../../../toc.html">
      <meta name="docfx:tocrel" content="../../toc.html">
      
      <meta name="docfx:rel" content="../../../../">
      
      
      
      <meta name="loc:inThisArticle" content="In this article">
      <meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
      <meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
      <meta name="loc:tocFilter" content="Filter by title">
      <meta name="loc:nextArticle" content="Next">
      <meta name="loc:prevArticle" content="Previous">
      <meta name="loc:themeLight" content="Light">
      <meta name="loc:themeDark" content="Dark">
      <meta name="loc:themeAuto" content="Auto">
      <meta name="loc:changeTheme" content="Change theme">
      <meta name="loc:copy" content="Copy">
      <meta name="loc:downloadPdf" content="Download PDF">

      <script type="module" src="./../../../../public/docfx.min.js"></script>

      <script>
        const theme = localStorage.getItem('theme') || 'auto'
        document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
      </script>

  </head>

  <body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
    <header class="bg-body border-bottom">
      <nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
        <div class="container-xxl flex-nowrap">
          <a class="navbar-brand" href="../../../../index.html">
            <img id="logo" class="svg" src="../../../../img/HiAPI.logo.png" alt="">
            
          </a>
          <button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
            <i class="bi bi-three-dots"></i>
          </button>
          <div class="collapse navbar-collapse" id="navpanel">
            <div id="navbar">
              <form class="search" role="search" id="search">
                <i class="bi bi-search"></i>
                <input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
              </form>
            </div>
          </div>
        </div>
      </nav>
    </header>

    <main class="container-xxl">
      <div class="toc-offcanvas">
        <div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
          <div class="offcanvas-header">
            <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
          </div>
          <div class="offcanvas-body">
            <nav class="toc" id="toc"></nav>
          </div>
        </div>
      </div>

      <div class="content">
        <div class="actionbar">
          <button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
            <i class="bi bi-list"></i>
          </button>

          <nav id="breadcrumb"></nav>
        </div>

        <article data-uid="">
          <h1 id="step-present-preference-page">Step Present Preference Page</h1>

<p>The model <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a> is from its parent component. The <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html">AppService</a>.<a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_AppConfig">AppConfig</a> is rapidly used.</p>
<p>The model of Candidate Keys Panel is <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_CandidateStepPresentKeyList">CandidateStepPresentKeyList</a>.
The model of Displayed Keys Panel is <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_AppConfig_DisplayedStepPresentKeyList">DisplayedStepPresentKeyList</a>.</p>
<h2 id="layout">Layout</h2>
<ul>
<li>Step Present Preference Page (or window)
<ul>
<li>Candidate Keys Panel
<ul>
<li>Category A Panel
<ul>
<li>Key a ToggleButton</li>
<li>Key b ToggleButton</li>
<li>...</li>
</ul>
</li>
<li>Category B Panel
<ul>
<li>...</li>
</ul>
</li>
<li>...</li>
<li>Category Other Panel</li>
</ul>
</li>
<li>Displayed Keys Panel
<ul>
<li>Key 1</li>
<li>Key 2</li>
<li>...</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>The categories are not defined for programming logic but only for user experience. So decide and define the categories in the GUI here only.</p>
<p>Since the Keys are not all come from the properties of <a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a>, a category panel (Category Other Panel) for the uncategoried keys is required.</p>
<p>The keys in the Displayed Keys Panel is in sequence of <a class="xref" href="../../../../api/Hi.HiNcKits.AppConfig.html#Hi_HiNcKits_AppConfig_DisplayedStepPresentKeyList">DisplayedStepPresentKeyList</a>. User tune the sequence and remove key by the Displayed Keys Panel. User add and remove the key from the ToggleButtons in Candidate Keys Panel. Those UI control items are required.</p>
<p>To both Candidate Keys Panel and Displayed Keys Panel:
Apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.<a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Name">Name</a> as Key label by <a class="xref" href="../../../../api/Hi.HiNcKits.AppService.html#Hi_HiNcKits_AppService_StepPresentAccessDictionary">StepPresentAccessDictionary</a>. Apply the key to the button tooltip.</p>
<p>The resx of <a class="xref" href="../../../../api/Hi.MachiningSteps.MachiningStep.html">MachiningStep</a> contains the translation of <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.<a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html#Hi_MachiningSteps_PresentAttribute_Name">Name</a>, apply the translation to the GUI. If the translation not existed, use the original value.</p>
<h3 id="categories">Categories</h3>
<p>Refer the code to design Categories:</p>
<pre><code class="lang-csharp" name="SampleCode-StepDiv">@using Hi.Common
@using Hi.Geom
@using Hi.Mech.Topo
@{
    string pCalss = &quot;d-flex flex-wrap gap-2&quot;;
    string cardTextClass = $&quot;card-text {pCalss}&quot;;
}

&lt;div class=&quot;card&quot; style=&quot;overflow-y: hidden; height:100%; &quot;&gt;
    &lt;div style=&quot;overflow-y: scroll; &quot;&gt;
        &lt;div style=&quot;height: auto&quot;&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#fileLineFlagTime-@Tid&quot;&gt;@Loc[&quot;File&quot;] / @Loc[&quot;Command&quot;] / @Loc[&quot;Flag&quot;] / @Loc[&quot;Time&quot;] / @Loc[&quot;System&quot;]&lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;fileLineFlagTime-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;File No.&quot;] : @Loc[&quot;Line No.&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;F.L.No.&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.FileNo : @MillingStep?.LineNo&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;File&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.FilePath&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Accumulated Time&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.AccumulatedTime.ToString(&quot;G&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Line Text&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.LineText&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Flags&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.FlagsText&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Step Index&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.StepIndex&lt;/span&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#toolFeedrateSpindleSpeed-@Tid&quot;&gt;@Loc[&quot;Tool&quot;] / @Loc[&quot;Feedrate&quot;] / @Loc[&quot;Spindle Speed&quot;]&lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;toolFeedrateSpindleSpeed-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Tool ID&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;T&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.ToolId&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;S&quot;] (rpm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.SpindleSpeed_rpm.ToString(&quot;G5&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;F&quot;] (mm/min)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.Feedrate_mmdmin.ToString(&quot;G5&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Feed per Tooth&quot;] (mm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.FeedPerTooth_mm.ToString(&quot;G5&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Feed per Cycle&quot;] (mm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.FeedPerCycle_mm.ToString(&quot;G5&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Tooth Arc Duration&quot;] (s)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.ToothArcDuration_s.ToString(&quot;G4&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Spindle Cycle Period&quot;] (s)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.SpindleCyclePeriod_s.ToString(&quot;G4&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Cutting Speed&quot;] (mm/s)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.CuttingSpeed_mmds?.ToString(&quot;G4&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#coordinateAndMove-@Tid&quot;&gt;@Loc[&quot;Coordinate&quot;] / @Loc[&quot;Move&quot;]&lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;coordinateAndMove-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        &lt;p class=&quot;@pCalss&quot;&gt;
                            @{
                                var mcCodes = HostMachiningProject?.MachiningEquipment?.GetMachiningChain()?.McCodes;
                                if (mcCodes != null)
                                {
                                    var mcTransformers = HostMachiningProject
                                    ?.MachiningEquipment?.GetMachiningChain()?.McTransformers;
                                    for (int i = 0; i &lt; mcCodes.Length; i++)
                                    {
                                        if (mcTransformers[i] == null)
                                            continue;
                                        if (mcTransformers[i] is DynamicRotation)
                                        {
                                            &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Machine Coordinate&quot;] @mcCodes[i] (deg)&quot;&gt;
                                                &lt;span class=&quot;form-label&quot;&gt;MC.@mcCodes[i] (deg)&lt;/span&gt;
                                                &lt;span class=&quot;form-control readonly w-auto&quot;&gt;
                                                    @MillingStep?.GetMcValue(i)?.SelfInvoke(v =&gt; MathUtil.ToDeg(v)).ToString(&quot;F5&quot;)
                                                &lt;/span&gt;
                                            &lt;/div&gt;
                                        }
                                        else
                                        {
                                            &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Machine Coordinate&quot;] @mcCodes[i] (mm)&quot;&gt;
                                                &lt;span class=&quot;form-label&quot;&gt;MC.@mcCodes[i] (mm)&lt;/span&gt;
                                                &lt;span class=&quot;form-control readonly w-auto&quot;&gt;
                                                    @MillingStep?.GetMcValue(i)?.ToString(&quot;F5&quot;)
                                                &lt;/span&gt;
                                            &lt;/div&gt;
                                        }
                                    }
                                }
                            }
                        &lt;/p&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Cutter Location Point&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;CL.XYZ (mm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.Cl?.Point?.ToString(&quot;F5&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Cutter Location Normal&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;CL.IJK&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.Cl?.Normal?.ToString(&quot;F5&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        @{
                            var moveDirection = MillingStep?.MoveOnProgramCoordinate.GetNormalized();
                            &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Move Direction&quot;] (@Loc[&quot;Workpiece Coordinate&quot;])&quot;&gt;
                                &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Move Direction&quot;] [W]&lt;/span&gt;
                                &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(moveDirection?.ToString(&quot;F4&quot;))&lt;/span&gt;
                            &lt;/div&gt;
                        }
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#gcgr-@Tid&quot;&gt;@Loc[&quot;Cutting Geometry&quot;] / @Loc[&quot;Chip&quot;] / @Loc[&quot;Bias&quot;] / @Loc[&quot;Roughness&quot;]&lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;gcgr-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Is Touched&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Is Touched&quot;]&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@Loc[(MillingStep?.IsTouched)?.ToString()]&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Cutting Width&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;ae (mm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.CuttingWidth_mm.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Cutting Depth&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;ap (mm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.CuttingDepth_mm.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Material Removal Rate&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;MRR (mm&lt;sup&gt;3&lt;/sup&gt;/s)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.Mrr_mm3ds.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Chip Thickness&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Chip Thickness&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.ChipThickness_um?.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Chip Volume&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Chip Volume&quot;] (mm&lt;sup&gt;3&lt;/sup&gt;)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.ChipVolume_mm3?.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Chip Mass&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Chip Mass&quot;] (mg)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.ChipMass_mg?.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Program Side Cusp&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Program Side Cusp&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.ProgramSideCusp_um.ToString(&quot;G4&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Re-Cut Depth&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Re-Cut Depth&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.ReCutDepth_um.ToString(&quot;G4&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Delta Tip Deflection&quot;] (@Loc[&quot;Tool Running Coordinate&quot;])&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Delta Tip Deflection&quot;] [TR] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.DeltaTipDeflectionOnToolRunningCoordinate_um?.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Max Tip Deflection&quot;] (@Loc[&quot;Tool Running Coordinate&quot;])&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Max Tip Deflection&quot;] [TR] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(MillingStep?.MaxTipDeflectionOnToolRunningCoordinate_um?.ToString(&quot;G3&quot;))&lt;/span&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#phe-@Tid&quot;&gt;
                @Loc[&quot;Mechanics&quot;] / @Loc[&quot;Power&quot;] / @Loc[&quot;Energy&quot;]
            &lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;phe-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Max Force&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Max Force&quot;] (N)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.MaxAbsForce_N?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Max Force&quot;] (@Loc[&quot;Tool Running Coordinate&quot;])&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Max Force&quot;] [TR] (N)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.MaxForceOnToolRunningCoordinate_N?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;

                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Average Moment about Sensor&quot;] (@Loc[&quot;Spindle Rotation Coordinate&quot;])&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Avg Moment about Sensor&quot;] [SR] (Nm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.AvgMomentAboutSensor_Nm?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Average Absolute Moment about Sensor&quot;] (@Loc[&quot;Spindle Rotation Coordinate&quot;])&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Avg Abs Moment about Sensor&quot;] [SR] (Nm)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.AvgAbsMomentAboutSensorVec3d_Nm?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;

                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Thermal Stress&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Thermal Stress&quot;] (MPa)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.ThermalStress_MPa?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Workpiece Plastic Depth&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Workpiece Plastic Depth&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.WorkpiecePlasticDepth_um.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;

                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Spindle Input Power&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Spindle Input Power&quot;] (W)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.SpindleInputPower_W.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Spindle Output Power&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Spindle Output Power&quot;] (W)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.SpindleOutputPower_W.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Accumulated Spindle Energy Consumption From Spindle Input Power&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Accumulated Spindle Energy Consumption&quot;] (kWh)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.AccumulatedSpindleEnergyConsumption_kWh.ToString(&quot;G6&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#tw-@Tid&quot;&gt;@Loc[&quot;Temperature&quot;] / @Loc[&quot;Wear&quot;]&lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;tw-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Chip Temperature&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Chip Temperature&quot;] (&lt;sup&gt;o&lt;/sup&gt;C)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.ChipTemperature_C?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Cutter Dermis Temperature&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Cutter Dermis Temperature&quot;] (&lt;sup&gt;o&lt;/sup&gt;C)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.CutterDermisTemperature_C?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Cutter Body Temperature&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Cutter Body Temperature&quot;] (&lt;sup&gt;o&lt;/sup&gt;C)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.CutterBodyTemperature_C?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Workpiece Dermis Temperature&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Workpiece Dermis Temperature&quot;] (&lt;sup&gt;o&lt;/sup&gt;C)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.WorkpieceDermisTemperature_C?.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Instant Crater Wear&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Instant Crater Wear&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.InstantCraterWear_um?.ToString(&quot;G3&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Accumulated Crater Wear&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Accumulated Crater Wear&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.AccumulatedCraterWear_um.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Accumulated Flank Wear Depth&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;@Loc[&quot;Accumulated Flank Wear Depth&quot;] (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.AccumulatedFlankWearDepth_um.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;w-auto&quot; title=&quot;@Loc[&quot;Accumulated Flank Wear Width&quot;]&quot;&gt;
                            &lt;span class=&quot;form-label&quot;&gt;VB (um)&lt;/span&gt;
                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@MillingStep?.AccumulatedFlankWearWidth_um.ToString(&quot;G4&quot;)&lt;/span&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;card-header py-0&quot; data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#custom-@Tid&quot;&gt;@Loc[&quot;Custom&quot;]&lt;/div&gt;
            &lt;div class=&quot;collapse show &quot; id=&quot;custom-@Tid&quot;&gt;
                &lt;div class=&quot;card-body &quot;&gt;
                    &lt;div class=&quot;@cardTextClass&quot;&gt;
                        @{
                            var flexDictionary=MillingStep?.FlexDictionary;
                            if (flexDictionary != null)
                            {
                                foreach(var entry in flexDictionary)
                                {
                                    if(HostMachiningProject?.StepPropertyAccessDictionary.TryGetValue(
                                        entry.Key, out var stepPropertyAccess)==true)
                                    {
                                        &lt;div class=&quot;w-auto&quot; title=&quot;@(stepPropertyAccess.PresentAttribute?.Name)&quot;&gt;
                                            &lt;span class=&quot;form-label&quot;&gt;@(stepPropertyAccess.PresentAttribute?.ShortName)&lt;/span&gt;
                                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(stepPropertyAccess.GetValueText(MillingStep))&lt;/span&gt;
                                        &lt;/div&gt;
                                    }
                                    else
                                    {
                                        &lt;div class=&quot;w-auto&quot; title=&quot;@(entry.Key) (@Loc[&quot;Not Registered&quot;])&quot;&gt;
                                            &lt;span class=&quot;form-label&quot;&gt;@(entry.Key)&lt;/span&gt;
                                            &lt;span class=&quot;form-control readonly w-auto&quot;&gt;@(entry.Value)&lt;/span&gt;
                                        &lt;/div&gt;
                                    }
                                }
                            }
                        }
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p>Refer the code to apply <a class="xref" href="../../../../api/Hi.MachiningSteps.PresentAttribute.html">PresentAttribute</a>.</p>
<pre><code class="lang-csharp" name="SampleCode-ShowStepPresent">internal static void ShowStepPresent(
    AppService userEnv, MachiningStep machiningStep)
{
    foreach (var entry in userEnv.DisplayedStepPresentAccessList)
    {
        var present = entry.Value.Present;
        var valueText = string.Format(&quot;{0:&quot; + present.DataFormatString + &quot;}&quot;, entry.Value.GetValueFunc.Invoke(machiningStep));
        Console.WriteLine($&quot;{present.ShortName}: {valueText} {present.TailUnitString} ({present.Name} [{entry.Key}])&quot;);
    }
}
</code></pre><h2 id="source-code-path">Source Code Path</h2>
<p>See <a href="../index.html">this page</a> for git repository.</p>
<h3 id="wpf-application-source-code-path">WPF Application Source Code Path</h3>
<ul>
<li>Preference/StepPresentPreferenceWindow</li>
</ul>
<h3 id="web-page-application-source-code-path">Web Page Application Source Code Path</h3>
<ul>
<li>wwwroot/preference/step-present-preference.js</li>
<li>Environments/PreferenceController.cs</li>
</ul>

</article>

        <div class="contribution d-print-none">
        </div>

        <div class="next-article d-print-none border-top" id="nextArticle"></div>

      </div>

      <div class="affix">
        <nav id="affix"></nav>
      </div>
    </main>

    <div class="container-xxl search-results" id="search-results"></div>

    <footer class="border-top text-secondary">
      <div class="container-xxl">
        <div class="flex-fill">
          <span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
        </div>
      </div>
    </footer>
  </body>
</html>
